extends Node

func _ready():
	var _e= Global.connect("game_over_signal",self,"_game_over")
	_e= Global.connect("life_num_change_signal",self,"set_life_num")
	_e= $"../EnemysManager".connect("born_num_change_sigal",self,"set_enemy_num") 
	set_life_num(Global.get_life_num())

func set_level_num(level_num):
	$LevelInfo/LevelNum.text=str(level_num)

func set_enemy_num(enemy_num):
	$EnmyInfo/EnmyNum.text=str(enemy_num)

func set_life_num(lift_num):
	$LifeInfo/LevelNum.text=str(lift_num)

func _game_over():
	print("aaaa")
	$GameOver.show()
	var game_over_tween= Tween.new()
	self.add_child(game_over_tween)
	
	game_over_tween.interpolate_property($GameOver,"position",Vector2(240,480),Vector2(240,256),2)
	game_over_tween.start()
